package com.zhou;

//import com.zhou.dao.impl.StudentDaoImpl;
import com.zhou.domain.Student;
import org.junit.Test;

import java.io.IOException;
import java.util.List;

//public class MybatisTest3 {
//    @Test
//    public void test1() {
//        StudentDaoImpl studentDao = new StudentDaoImpl();
//        List<Student> studentList = studentDao.selectStudents();
//        studentList.forEach(student -> System.out.println("单元测试中输出"+student));
//    }
//
//    @Test
//    public void test2()  {
//        Student student = new Student();
//        student.setId(5);
//        student.setName("zhangsan");
//        student.setEmail("zhangsan@168.com");
//        student.setAge(14);
//        StudentDaoImpl studentDao = new StudentDaoImpl();
//        int i = studentDao.insertOneStudent(student);
//        System.out.println("影响数据行数: "+i);
//    }
//
//    @Test
//    public void test3()  {
//        StudentDaoImpl studentDao = new StudentDaoImpl();
//        Student student = new Student();
//        student.setId(5);
//        student.setName("new-zhangsan");
//        int i = studentDao.updateStudent(student);
//        System.out.println("影响数据行数: "+ i);
//    }
//
//    @Test
//    public void test4()  {
//        StudentDaoImpl studentDao = new StudentDaoImpl();
//        int i = studentDao.deleteStudent(5);
//        System.out.println("影响数据行数: "+i);
//    }
//}
